// store/area.js
import { defineStore } from 'pinia';

export const useAreaStore = defineStore('area', {
  state: () => ({
    selectedAreaId: null,
    expandedNodes: []
  }),
  actions: {
    setSelectedAreaId(areaId) {
      this.selectedAreaId = areaId;
    },
    setExpandedNodes(nodes) {
      this.expandedNodes = nodes;
    }
  },
  getters: {
    getSelectedAreaId: (state) => state.selectedAreaId,
    getExpandedNodes: (state) => state.expandedNodes
  }
});